package com.gobuy.common.pojo;
/*
*
* 错误的消息提示枚举类
*
* */
public enum MessageEnum {

//    public static final int OK=20000;//成功
//    public static final int ERROR =20001;//失败
//    public static final int LOGINERROR =20002;//用户名或密码错误
//    public static final int ACCESSERROR =20003;//权限不足
//    public static final int REMOTEERROR =20004;//远程调用失败
//    public static final int REPERROR =20005;//重复操作

    /*
    *
    * 成功状态码定义
    * */
    OK_SELECT_ALL(true,2000,"成功查询所有"),
    OK_SELECT_CONDITIOM(true,20000,"成功按条件查询"),
    OK_DELETE_ID(true,20000,"根据id成功删除"),
    OK_UPDATE(true,20000,"成功更新"),
    OK_ADD(true,20000,"成功新增"),
    OK_SELECT_PAGE(true,20000,"成功分页查询"),
    OK_SELECT_CONDITION_PAGE(true,20000,"成功按条件删除以及分页"),



    /*
     *
     * ERROR失败状态下的状态码
     * */
    ERROR_SELECT_ALL(false,2001,"查询所有失败"),
    ERROR_SELECT_CONDITION(false,2001,"按条件查询失败"),
    ERROR_SELECT_PAGE(false,2001,"查询分页失败"),
    ERROR_DELETE_ID(false,2001,"根据id删除失败"),
    ERROR_UPDATE(false,2001,"更新失败"),
    ERROR_SELECT_CONDITION_PAGE(false,2001,"根据条件并分页失败"),
    ERROR_ADD(false,2001,"新增失败"),

    /*
     *
     * LOGINERROR用户名和密码状态码错误
     *
     * */
    LOGINERROR_USER(false,2002,"用户名不正确"),
    LOGINERROR_PASSWORD(false,2002,"密码不正确"),



    /*
     *
     * ACCESSERROR权限不足的状态码
     *
     * */

    ACCESSERROR_SELECT_ALL(false,2003,"查询所有权限不足"),
    ACCESSERROR_UPDATE(false,2003,"更新操作权限不足"),
    ACCESSERROR_ADD(false,2003,"新增的权限不足"),
    ACCESSERROR_DELETE(false,2003,"删除权限不足"),



    /*
     * REMOTEERROR远程调用失败状态码
     *
     * */

    REMOTEERROR_ALL(false,2004,"远程调用失败"),



    /*
     *
     * REPERROR重复问题
     *
     * */
//    public static final String REPERROR_SELECT="重复查询，老铁";
//    public static final String REPERROR_DELETE="重复删除，老铁";
//    public static final String REPERROR_UPDATE="重复更新，老铁";
//    public static final String REPERROR_ADD="重复添加，老铁";
    REPERROR_SELECT(false,2005,"重复查询"),
    REPERROR_DELETE(false,2005,"重复删除"),
    REPERROR_UPDATE(false,2005,"重复更新"),
    REPERROR_ADD(false,2005,"重复添加");



    private boolean  resultStatu;//结果集状态，true或者false

    private Integer resultCode;//结果集的状态码

    private String message;//结果集响应提示信息




    /*
    *
    * 构造方法传入参数
    *
    * */
    MessageEnum(boolean  resultStatu ,Integer resultCode,String message){
        this.resultStatu=resultStatu;
        this.message=message;
        this.resultCode=resultCode;

    }







    /*
    *
    * 对应的get和set方法
    * */

    public boolean getResultStatu() {
        return resultStatu;
    }

    public void setResultStatu(boolean resultStatu) {
        this.resultStatu = resultStatu;
    }

    public Integer getResultCode() {
        return resultCode;
    }

    public void setResultCode(Integer resultCode) {
        this.resultCode = resultCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }



}
